package com.entropy.code.controller;

import com.entropy.code.dto.UserDTO;
import com.entropy.code.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author xiachao
 * @date 2022-01-26
 */
@RestController
@RequestMapping("user")
public class HelloController {

    @Resource
    private UserService userService;

    @RequestMapping("info")
    public UserDTO query(Long uid) {
        return this.userService.getByUid(uid);
    }
}
